<template>
  <div class="slider">
    <van-swipe initial-swipe="2">
      <van-swipe-item v-for="(item,index) in sliders" :key="index">
        <a :href="item.href"><img v-lazy="item.src" alt=""></a>
      </van-swipe-item>
    </van-swipe>
  </div>
</template>

<script>
export default {
  name: 'HomeSwipe',
  props: {
    sliders: Array,
    default() {
      return [];
    },
  },
};
</script>

<style lang="less" scoped>
.slider {
  padding: 8px 16px;
  background-color: #fff;
  img {
    height: 120px;
    border-radius: 8px;
  }
}
</style>
